package com.wuyou.designPatterns.interpreter;

/**
 * @Description <program> ::= program <command list>
 * @Author 无忧
 * @Date 2024/10/20 21:48
 */
public class ProgramNode extends Node {

    private Node commandListNode;

    @Override
    public void parse(Context context) throws ParseException {
        context.skipToken("program");
        commandListNode = new CommandListNode();
        commandListNode.parse(context);
    }

    public String toString(){
        return "[program " + commandListNode + "]";
    }
}
